<template>
  <div class="child">
    <h3>我是Child</h3>
    <p>父组件的count值是{{ count }}</p>
    <button @click="$emit('changeMe', 1)">对count进行累加</button>
    <GrandSon v-bind="$attrs" v-on="$listeners" />
  </div>
</template>

<script>
import GrandSon from "./GrandSon";
export default {
  name: "Child",
  props: ["count"],
  components: {
    GrandSon,
  },
  mounted() {
    console.log(this.$attrs);
    console.log(this.$listeners);
  },
};
</script>

<style scoped>
.child {
  background: skyblue;
}
</style>